Custom Visualizations
From the Formulate module, you can create sharable custom visuals, that other users can leverage in their data discoveries. Custom Visualizations allow users to create their own data visualization logic to draw query results using representations that are not covered by the built-in library of standard charts and visualizations.
Custom visuals are created in Formulate, and can then be used in Discover to represent your data discoveries. Here, they are designed in concert with the Custom Visual APIs to program the way the engine will draw the query results to screen. As with any other visual, a custom visual saved as a data discovery can then be used in presentations, and publications.
Note: This feature is only available with Enterprise licensing.
Building a Custom Visual
Before you begin
To open the custom visual builder, go to Formulate, select Custom Visual, and then choose your model. To start, you may want to choose the sample data model to use for testing your custom logic:
The Custom Visual wizard opens, where you can build your visualization.
Note: You can click Apply at any point to see a preview of your custom visual, however, you must be sure to add hierarchies and measures to the query if you want to see a preview.
Step 1
From the Metadata panel, you can name your custom visual, add a description, and upload an icon.
You are going to work through the Custom Visuals wizard's tabs, starting at the Drop Zones tab.
Step 2
Click the Drop Zones tab. This is where you can specify the drop zones that should appear when your custom visual is selected in Discover. Select the required drop zones. You can then define:
- Caption: the name of the drop zone.
- Required: select Required if the custom visual shouldn't be draw if there is no chip added to the specified drop zone.
- Chip Type: choose whether the specified drop zone must contain a hierarchy, or a measure. If the drop zone should be enabled for both hierarchies and measures, choose None.
- Priority: select the order in which drop zones should be utilized for the specified chip type. For instance, assign a Hierarchy chip type to Columns, Rows, and Filters. Then assign a Priority of 1 to Columns, 2 to Rows, and 3 to Filters; when hierarchies are selected via double-click from the Dimensions panel in Discover, the first chip will be automatically added to Columns, the second to Rows, and the third to Filters.
Step 3
From the Script tab, you can write the script for your custom visual. You can also download a custom visual script by opening the Marketplace in the ribbon. Click Apply to apply changes to the preview.
|
Use the Explain Script function to produce an AI-generated explanation of what the script does. Each time you click the Explain Script button, a new explanation is generated. This explanation can be generated regardless of the method used to generate the script itself. For more information, see Explain Script. |
This explanation can be copied, and then pasted into the node Description field, for example.
- Apply: apply changes made in the currently selected panel. Click this button after making changes in each panel, to update the preview as you work.
- Apply to All: apply changes made in all panels. Click this button to see all changes in the preview, regardless of the selected panel.
Step 4
When you've finished configuring the visual, click Save above the canvas. Your visual is saved to the CMS.
Once you've saved your visual, it will appear in the custom visuals pop-out from the Toolbox in Discover, and can be used as a visualization.
You can access the custom visual's logic from the CMS the asset is saved under the name given when it was saved to the CMS. Like other assets, you can open it, edit it, and open its Actions Panel.
Custom Visual Scripting and API
There are two ways to create custom visuals:
- Download a visual from the Marketplace (in the ribbon) for a fully scripted solution
- Add your own custom visual script in the Script panel
You can add your own script from the Script panel. The template in the Script window contains several API functions. Of these, the MyCustomVisual function must be implemented, and the custom visual must be built in one chunk (not trellised).
You can reference any other external JavaScript library to build your own visualizations, including D3, High charts and Plotly.
It is important to understand that blue chips (hierarchies) affect the number of data points in a query, but orange chips (measures) don't.
- Refer to the Custom Visual API documentation for more information.
Custom Visual Marketplace
The Custom Visual marketplace includes many charts that have been either developed by Pyramid or by Partners. These chart types have been developed by Pyramid, are included OOTB with the product deployment and operate like any other normal chart included in the product. They represent examples of how to develop a custom visualization using the API.
To view and select a Custom Visual from the marketplace, click Marketplace in the Ribbon:
The Marketplace dialog opens. Note that you can search for and use tags to find the Custom Visual you are interested in.
Download any of the following Custom Visuals from the Marketplace:
- Diverging Stacked Bar Chart
- 3D Scatter Plot
- Aster Plot
- Heat Grid
- Measure Waterfall
- 2D Density Plot
- Tabular Grid
- Data Card
- Gantt Chart
- Chord Diagrams
- Network Diagram
For more information about these Custom Visual Types, see Custom Visuals.
Securing Custom Visuals
By default, all users will see your custom visual in Discover, even if it was saved in My Content. If you want to limit which roles (and, therefore, which users) can create and view them, you can specify permissions for your custom visuals from the Profiles tab in the Admin console.